export default {
  routes: [
    // 订单管理
    {
      path: '/Orders',
      meta: { name: '订单管理', role: ['super'] },
      component: () =>
        import(/* webpackChunkName: "Orders" */ '../views/Orders/index.vue')
    },
    // 商品管理
    {
      path: '/Goods',
      meta: { name: '商品管理' },
      component: () =>
        import(/* webpackChunkName: "Goods" */ '../views/Goods/index.vue'),
      redirect: '/Goods/GoodsList',
      children: [
        {
          path: '/Goods/GoodsList',
          meta: { name: '商品列表' },
          component: () =>
            import(
              /* webpackChunkName: "Orders" */ '../views/Goods/GoodsList.vue'
            )
        },
        {
          path: '/Goods/GoodsAdd',
          meta: { name: '商品添加' },
          component: () =>
            import(
              /* webpackChunkName: "Orders" */ '../views/Goods/GoodsAdd.vue'
            )
        },
        {
          path: '/Goods/GoodsCate',
          meta: { name: '商品分类' },
          component: () =>
            import(
              /* webpackChunkName: "Orders" */ '../views/Goods/GoodsCate.vue'
            )
        }
      ]
    },
    // 店铺管理
    {
      path: '/Shop',
      meta: { name: '店铺管理', role: ['super'] },
      component: () =>
        import(/* webpackChunkName: "Shop" */ '../views/Shop/index.vue')
    },
    // 账号管理
    {
      path: '/Account',
      meta: { name: '账号管理', role: ['super', 'normal'] },
      component: () =>
        import(/* webpackChunkName: "Account" */ '../views/Account/index.vue'),
      redirect: '/Account/AccountList',
      children: [
        {
          path: '/Account/AccountList',
          meta: { name: '账号列表', role: ['super'] },
          component: () =>
            import(
              /* webpackChunkName: "Account" */ '../views/Account/AccountList.vue'
            )
        },
        {
          path: '/Account/AccountAdd',
          meta: { name: '账号添加', role: ['super'] },
          component: () =>
            import(
              /* webpackChunkName: "Account" */ '../views/Account/AccountAdd.vue'
            )
        },
        {
          path: '/Account/ResetPwd',
          meta: { name: '修改密码' },
          component: () =>
            import(
              /* webpackChunkName: "Account" */ '../views/Account/ResetPwd.vue'
            )
        },
        {
          path: '/Account/main',
          meta: { name: '个人中心' },
          component: () =>
            import(
              /* webpackChunkName: "Account" */ '../views/Account/main.vue'
            )
        }
      ]
    },
    // 销售统计
    {
      path: '/Count',
      meta: { name: '销售统计', role: ['super'] },
      component: () =>
        import(/* webpackChunkName: "Count" */ '../views/Count/index.vue'),
      redirect: '/Count/GoodsCount',
      children: [
        {
          path: '/Count/GoodsCount',
          meta: { name: '商品统计', role: ['super'] },
          component: () =>
            import(
              /* webpackChunkName: "Count" */ '../views/Count/GoodsCount.vue'
            )
        },
        {
          path: '/Count/OrdersCount',
          meta: { name: '订单统计', role: ['super'] },
          component: () =>
            import(
              /* webpackChunkName: "Count" */ '../views/Count/OrdersCount.vue'
            )
        }
      ]
    }
  ]
}
